package com.free.bsf.demo.eurekaclient;

import com.free.bsf.health.memoryParse.MemoryRecordUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

import java.util.ArrayList;
import java.util.List;

@SpringBootApplication
@EnableFeignClients(basePackages = {"com.free.bsf.demo"})
public class ClientApplication {
    public static void main(String[] args) {
        SpringApplication.run(ClientApplication.class,args);
        List<String> rs = new ArrayList<>();
        for(int i=0;i<100000;i++){
            rs.add(i+"");
        }
        MemoryRecordUtils.checkResultSize(rs);
        rs.clear();
        rs =null;
        System.gc();
 int a=1;

        //SpringApplicationBuilder builder = new SpringApplicationBuilder(ClientApplication.class);
//        SpringApplication application = builder.application();
//        application.addListeners((l)->{
//            if(l.getSource() instanceof CloudEurekaClient) {
//                System.out.println(l.getSource().getClass());
//            }
//        });
//        val context = application.run(args);
//        //val context = SpringApplication.run(ClientApplication.class,args);
//        val provider = context.getBean(AbstractDemo.class);
//        provider.hello444("");

    }
}
